// which properties go to attributes and vice versa

function testProps() {

var strings = [ 'accept', 'alt', 'autocomplete', 'defaultValue',
	'files', 'form', 'formAction', 'formEncType', 'formMethod',
	'formTarget', 'list', 'name', 'pattern', 'placeholder', 'scr', 'type', 'validationMessage', 'validity', 'value' ];
	/* 'valueAsDate', 'valueAsNumber', */
var numbers = [ 'maxLength', 'selectedOption', 'selectionEnd', 'size' ];
var booleans = [ 'autofocus', 'checked', 'defaultChecked', 'disabled', 'formNoValidate',
	'indeterminate', 'multiple', 'readonly', 'required', 'willValidate' ];

var f = document.createElement('form');
f.id = 'text';

for( var i=0; i<strings.length; i++ ) {
	atr = strings[i];
	var i0 = document.createElement('input');
	var i1 = document.createElement('input');
	i1[atr] = 'text';
	var i2 = document.createElement('input');
	i2.setAttribute(atr,'text');
	console.log( atr +': '+i0.hasOwnProperty(atr)+', '+i0.hasAttribute(atr)+', '+i1[atr]+', '+i1.getAttribute(atr)
		+', '+i2[atr]+', '+i2.getAttribute(atr) );
}

for( var i=0; i<numbers.length; i++ ) {
	atr = numbers[i];
	var i0 = document.createElement('input');
	var i1 = document.createElement('input');
	i1[atr] = 99;
	var i2 = document.createElement('input');
	i2.setAttribute(atr,99);
	console.log( atr +': '+i0.hasOwnProperty(atr)+', '+i0.hasAttribute(atr)+', '+i1[atr]+', '+i1.getAttribute(atr)
		+', '+i2[atr]+', '+i2.getAttribute(atr) );
}

for( var i=0; i<booleans.length; i++ ) {
	atr = booleans[i];
	var i0 = document.createElement('input');
	var i1 = document.createElement('input');
	i1[atr] = true;
	var i2 = document.createElement('input');
	i2.setAttribute(atr,'true');
	console.log( atr +': '+i0.hasOwnProperty(atr)+', '+i0.hasAttribute(atr)+', '+i1[atr]+', '+i1.getAttribute(atr)
		+', '+i2[atr]+', '+i2.getAttribute(atr) );
}

}
